<%@ page session="false" %>
<%@ page language="java" contentType="application/json; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="javax.jcr.*, org.apache.sling.api.resource.Resource"%>
<%@ taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %>
<%@ page trimDirectiveWhitespaces="true" %>
<sling:defineObjects />
<%	
	// Current node contains all bibles
	NodeIterator bibles = currentNode.getNodes();
%>[<%
		while(bibles.hasNext()){
			Node bible = bibles.nextNode();
	%>{
		"id": "<%=bible.getProperty("sid").getValue().getString()%>",
		"title": "<%=bible.getProperty("title").getValue().getString()%>",
		"description": "<%=bible.getProperty("description").getValue().getString().replaceAll("\n"," ")%>"
	}<%
		if(bibles.hasNext()){
		%>,<%
		}
	}
	%>]